<?php
class SmiliesForm extends Zend_Form {
    public function __construct($options = null) 
    {
    	$baseurl 	= new MHDEV_View_Helper_BaseUrl();
    	$translate	= Zend_Registry::get('lang');
    	
        parent::__construct($options);
        
        $this->setName('smilies');
        
        // wrapper
        $wrapper = new Zend_Form_Element_Text('wrapper');
        $wrapper->setLabel($translate->_('moderation_smiley_wrapper'));
        $wrapper->setRequired(true);
        $wrapper->addValidator('NotEmpty');
        $wrapper->setErrorMessages(array(
            0 => $translate->_('form_error_empty')
        ));
        
        // desc
        $desc = new Zend_Form_Element_Text('desc');
        $desc->setLabel($translate->_('moderation_smiley_desc'));
        $desc->setDescription($translate->_('moderation_smiley_ddesc'));
 		
        // image
		$image = new Zend_Form_Element_Text('image');
		$image->setLabel($translate->_('moderation_smiley_image'));
		$image->setDescription($translate->_('moderation_smiley_dimage'));
		$image->setRequired(true);
		$image->setErrorMessages(array(
            0 => $translate->_('form_error_empty')
        ));
		
        // Submit
        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setLabel($translate->_('form_save'));

        
        $this->addElements(array($wrapper, $desc, $image, $submit));
    }
}  
?>